package utils

import com.rabbitmq.client.ConnectionFactory

/**

 @author HSH

 @create 2022-01-06 10:32
创建连接工厂创建信道工具类
 */
class RabbitMqUtils {
    static getChannel(){
        ConnectionFactory factor = new ConnectionFactory()
        factor.host = "127.0.0.1"
        factor.username = "admin"
        factor.password = "admin"
        def connection = factor.newConnection()
        return connection.createChannel()
    }
}
